|
|
Rafal 'Raf256' Maj <raf### [at] raf256com> wrote:
> unfourtunetly I need 1000*1000 object { GrassPatch }
> so I wanted to create BigGrassPatch that is a union of 10*10 GrassPatch'es
> and then duplicate it 100*100 times, but in current yntax it seems
> impossible without hand transforming each grass pice (as described in post
> (exacly)...)
Have you ever heard of #while-loops? They are handy, you know...
#declare GrassPatch = mesh { ... }
#declare Xpos = 0;
#while(Xpos < 100)
#declare Zpos = 0;
#while(Zpos < 100)
object { GrassPatch translate <Xpos, 0, Zpos> }
#declare Zpos = Zpos+1;
#end
#declare Xpos = Xpos+1;
#end
Magically you get 100*100 instances of the mesh.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|